var mongoose = require('mongoose')
const Schema = mongoose.Schema

const book_schema = new Schema({
    bookName:String,
    detail:String,
    price:String,
    pic:String,
    author:String,
    Borrow:Boolean,
    time:String
})

exports.book_model = mongoose.model('books',book_schema)

const user_schema = new Schema({
    username:String,
    age:Number,
    email:String,
    phone:String,
    password:String,
    time:Date,
    word:String,
    msg:String,
    sex:String,
    birth:String,
    role:Number,     // 1. 普通用户  2.管理员  3. 超级管理员
    avatar:String
    
    
})

exports.user_model = mongoose.model('users',user_schema)
